package cn.snowheart.observer.weather.jvm.weather;

import java.util.Observable;

/**
 * @author liuwanxiang
 * @version 2019/06/24
 */
public class WeatherData extends Observable {

    private int data;

    @Override
    protected synchronized void setChanged() {
        super.setChanged();
    }

    public void measurementsChanged() {
        setChanged();
        notifyObservers(data);
    }

    public void setData(int data) {
        this.data = data;
        measurementsChanged();
    }

    public int getData() {
        return data;
    }
}
